bors [Tue, 11 Nov 2014 18:59:12 +0000 (18:59 +0000)]
auto merge of #829 : alexcrichton/cargo/less-paniks, r=brson
Unused overrides previously led to a panic, and build cmd outputs were cached in the *host* location instead of the *target* location.
bors [Tue, 11 Nov 2014 04:59:34 +0000 (04:59 +0000)]
auto merge of #828 : alexcrichton/cargo/issue-821, r=brson
They don't have any! We also care more about the other targets regardless.
Closes #821
Alex Crichton [Mon, 10 Nov 2014 17:52:14 +0000 (09:52 -0800)]
Cache build output in the target build directory
Placing it in the host directory may end up later on down the road causing a
spurious recompilation when one isn't necessary. I couldn't currently think of a
test case for this, as I don't think that this affects correctness.
bors [Tue, 11 Nov 2014 01:59:36 +0000 (01:59 +0000)]
auto merge of #816 : alexcrichton/cargo/issue-812, r=brson
Closes #812
Alex Crichton [Mon, 10 Nov 2014 17:36:36 +0000 (09:36 -0800)]
Don't panic on unused overrides
This previously did a failing hashtable lookup when an `Option`-returning `get`
would suffice.
Alex Crichton [Mon, 10 Nov 2014 17:22:04 +0000 (09:22 -0800)]
Don't look at custom build targets for output locs
They don't have any! We also care more about the other targets regardless.
Closes #821
bors [Mon, 10 Nov 2014 16:44:36 +0000 (16:44 +0000)]
auto merge of #826 : tomaka/cargo/update-links-readme, r=alexcrichton
Pierre Krieger [Mon, 10 Nov 2014 12:44:28 +0000 (13:44 +0100)]
Update links to windows nightlies in the README
bors [Sun, 9 Nov 2014 19:59:34 +0000 (19:59 +0000)]
auto merge of #823 : DiamondLovesYou/cargo/master, r=alexcrichton
Richard Diamond [Sun, 9 Nov 2014 02:56:49 +0000 (20:56 -0600)]
Respect Target target vs host exe suffix distinction.
Alex Crichton [Fri, 7 Nov 2014 21:40:36 +0000 (13:40 -0800)]
Clarify the documentation on `cargo test`
Closes #812
bors [Fri, 7 Nov 2014 21:15:52 +0000 (21:15 +0000)]
auto merge of #815 : alexcrichton/cargo/another-fix-oh-by-wait-i-verified-this-one-its-ok, r=alexcrichton
Previously the host/target requirement for packages was not correctly calculated
as dependency edges to build dependencies weren't traversed by accident.
Alex Crichton [Fri, 7 Nov 2014 20:59:44 +0000 (12:59 -0800)]
Another fix for cross-compiled build scripts
Previously the host/target requirement for packages was not correctly calculated
as dependency edges to build dependencies weren't traversed by accident.
bors [Fri, 7 Nov 2014 19:28:57 +0000 (19:28 +0000)]
auto merge of #813 : alexcrichton/cargo/build-cmd-cross-compile, r=brson
These commits contain a number of improvements to the usage of build scripts when cross compiling. A few erroneous assumptions were made to start out with, and this also fixes the long-standing bug of using build scripts in host packages (e.g. plugins and build dependencies).
Alex Crichton [Fri, 7 Nov 2014 19:09:59 +0000 (11:09 -0800)]
Fix build scripts and double-compiled packages
This commit fixes support for build scripts in packages which are compiled for
both the host and target architectures. The support was previously hindered by
the fact that the build script was always invoked precisely once for the target
architecture unconditionally.
This adds support for build scripts themselves to depend on build scripts, and
everything should "just work" if build scripts respect their environment
variables.
Alex Crichton [Fri, 7 Nov 2014 17:25:25 +0000 (09:25 -0800)]
Fix cross compiling with a build script
Previously there was a mixup of where the build script was getting compiled into
as well as where the output was going to. This commit fixes the problems for
now, but still has room for improvement in the future.
Build scripts themselves are now unconditionally built into `target/build/..`
because they're compiled for the host platform. Their outputs are in
`target/$target/build/..` as expected.
bors [Fri, 7 Nov 2014 16:52:47 +0000 (16:52 +0000)]
auto merge of #798 : alexcrichton/cargo/issue-777, r=brson
At the same time this commit renames the `.tar.gz` extension to `.crate`. This
helps our perception on Windows as we're not trying to leave them out in the
dark, and we'd also like the ability to modify the format later in the future.
Closes #777
bors [Fri, 7 Nov 2014 16:32:17 +0000 (16:32 +0000)]
auto merge of #811 : alexcrichton/cargo/update, r=alexcrichton
Need to land them all as one unit to actually pass the whole test suite.
Alex Crichton [Fri, 7 Nov 2014 06:38:26 +0000 (22:38 -0800)]
Update with breaking changes from tonight's nigthly
Alex Crichton [Thu, 6 Nov 2014 16:58:01 +0000 (08:58 -0800)]
Pass `-C prefer-dynamic` for dylib dependencies
Alex Crichton [Thu, 6 Nov 2014 16:56:34 +0000 (08:56 -0800)]
Fix a tidy issue with src/bin/cargo.rs
Alex Crichton [Thu, 6 Nov 2014 16:50:51 +0000 (08:50 -0800)]
Merge branch 'args' of https://github.com/ebfe/cargo into update
Alex Crichton [Thu, 6 Nov 2014 16:49:16 +0000 (08:49 -0800)]
Merge branch 'add-did-you-mean' of https://github.com/pwoolcoc/cargo into update
Alex Crichton [Thu, 6 Nov 2014 16:45:58 +0000 (08:45 -0800)]
Merge branch 'fix-build-auth-test.rs' of https://github.com/pwoolcoc/cargo into update
Paul Woolcock [Thu, 6 Nov 2014 02:05:01 +0000 (21:05 -0500)]
Add 'did you mean...' message when a subcommand is not found.
Steve Klabnik [Thu, 6 Nov 2014 13:19:30 +0000 (08:19 -0500)]
update rust-encoding
https://github.com/alexcrichton/toml-rs/pull/28 also needs to be in here to truly fix the build
Paul Woolcock [Thu, 6 Nov 2014 13:08:38 +0000 (08:08 -0500)]
TcpListener::bind now takes 1 argument instead of 2
Michael Gehring [Thu, 6 Nov 2014 09:22:14 +0000 (10:22 +0100)]
Fix infinite recursion when invoked without args
bors [Thu, 6 Nov 2014 00:02:30 +0000 (00:02 +0000)]
auto merge of #799 : alexcrichton/cargo/moar-parallel, r=brson
When building unit tests for a library, we don't need the library itself to be
built beforehand, so the two can be built in parallel. If the crate takes awhile
to compile, this shows some excellent wall-time speedups.
bors [Wed, 5 Nov 2014 23:43:18 +0000 (23:43 +0000)]
auto merge of #804 : alexcrichton/cargo/moar-fixes, r=alexcrichton
Some flaky test improvements as well as some updates to the styling of the docs.
Alex Crichton [Wed, 5 Nov 2014 23:14:30 +0000 (15:14 -0800)]
Fix up some styling on the build-script docs
Alex Crichton [Wed, 5 Nov 2014 23:06:06 +0000 (15:06 -0800)]
Fix some more flaky tests
At the same time, also improve the deprecation message for the old build command
to be a little more descriptive about how to migrate
bors [Wed, 5 Nov 2014 23:02:41 +0000 (23:02 +0000)]
auto merge of #802 : alexcrichton/cargo/issue-801, r=brson
Previously all features were traversed when adding information to the lockfile,
but the traversal forgot to add optional dependencies that did not have a
corresponding feature.
Closes #801
bors [Wed, 5 Nov 2014 22:35:35 +0000 (22:35 +0000)]
auto merge of #803 : alexcrichton/cargo/fix-some-tests, r=alexcrichton
Right now we're accidentally not actually leveraging this function well in some
tests due to this sequence of events:
1. The tests run at time X, building artifacts that remember the fingerprint is
at time X.
2. The entire project is moved back one hour to (X-1).
3. A new file is created, at time X (second-level resolution on some systems).
4. On a rebuild, the maximum mtime is still X (due to the new file).
For this reason there are some more calls to move_into_the_past() to push files
back another hour after they've been created to make sure the maximum mtime is
(X-1), or something different than X.
Alex Crichton [Wed, 5 Nov 2014 22:00:38 +0000 (14:00 -0800)]
More aggresively move_into_the_past for tests
Right now we're accidentally not actually leveraging this function well in some
tests due to this sequence of events:
1. The tests run at time X, building artifacts that remember the fingerprint is
at time X.
2. The entire project is moved back one hour to (X-1).
3. A new file is created, at time X (second-level resolution on some systems).
4. On a rebuild, the maximum mtime is still X (due to the new file).
For this reason there are some more calls to move_into_the_past() to push files
back another hour after they've been created to make sure the maximum mtime is
(X-1), or something different than X.
Alex Crichton [Wed, 5 Nov 2014 03:40:06 +0000 (19:40 -0800)]
Build lib tests and libraries in parallel
When building unit tests for a library, we don't need the library itself to be
built beforehand, so the two can be built in parallel. If the crate takes awhile
to compile, this shows some excellent wall-time speedups.
bors [Wed, 5 Nov 2014 21:13:08 +0000 (21:13 +0000)]
auto merge of #792 : alexcrichton/cargo/build-cmd, r=brson
This series of commits (based on https://github.com/rust-lang/cargo/pull/763) is an implementation of the recent [Cargo RFC](https://github.com/rust-lang/rfcs/blob/master/text/0403-cargo-build-command.md). This should implement all portions of the RFC, but there's a lot so an extra set of eyes would be nice!
I haven't added documentation for it all yet, but I would like to do so before landing (starting with https://github.com/rust-lang/cargo/pull/749). Otherwise I've been migrating all of the existing cargo dependencies away from the build command to a build script, and the progress can be seen with these repositories:
* https://github.com/alexcrichton/gcc-rs
* https://github.com/alexcrichton/pkg-config-rs
* https://github.com/alexcrichton/git2-rs/tree/build-cmd
* https://github.com/alexcrichton/openssl-sys
* https://github.com/alexcrichton/flate2-rs/tree/build-cmd
* https://github.com/alexcrichton/libz-sys
* https://github.com/alexcrichton/ssh2-rs/tree/build-cmd
I haven't quite gotten around to curl just yet, but it's next on my list!
Alex Crichton [Wed, 5 Nov 2014 20:28:00 +0000 (12:28 -0800)]
Fix custom build tests on windows
Alex Crichton [Wed, 5 Nov 2014 02:56:08 +0000 (18:56 -0800)]
Move generated tarballs under target/package
At the same time this commit renames the `.tar.gz` extension to `.crate`. This
helps our perception on Windows as we're not trying to leave them out in the
dark, and we'd also like the ability to modify the format later in the future.
Closes #777
Alex Crichton [Wed, 5 Nov 2014 19:13:04 +0000 (11:13 -0800)]
Be sure to lock purely optional dependencies
Previously all features were traversed when adding information to the lockfile,
but the traversal forgot to add optional dependencies that did not have a
corresponding feature.
Closes #801
Alex Crichton [Tue, 4 Nov 2014 21:20:31 +0000 (13:20 -0800)]
Expand the "link to system libraries" section
Alex Crichton [Tue, 4 Nov 2014 07:20:19 +0000 (23:20 -0800)]
Follow through on the OUT_DIR promise for rustc compiles
Alex Crichton [Tue, 4 Nov 2014 07:20:13 +0000 (23:20 -0800)]
Fix some flaky tests
Alex Crichton [Tue, 4 Nov 2014 06:45:11 +0000 (22:45 -0800)]
Dox fixups
Alex Crichton [Tue, 4 Nov 2014 00:23:42 +0000 (16:23 -0800)]
Fix the build command passing -L/-l without links
Alex Crichton [Mon, 3 Nov 2014 20:08:01 +0000 (12:08 -0800)]
Beef up documentation about build scripts
Pierre Krieger [Thu, 23 Oct 2014 10:48:01 +0000 (12:48 +0200)]
Update documentation for new build command system
Alex Crichton [Sat, 1 Nov 2014 18:51:58 +0000 (11:51 -0700)]
Really fix `cargo test` and fix an OUT_DIR bug
Assorted bug fixes discovered while migrating packages to using this build
command infrastructure.
Alex Crichton [Sat, 1 Nov 2014 02:16:39 +0000 (19:16 -0700)]
Add a test for build commands with build commands
Alex Crichton [Sat, 1 Nov 2014 01:39:39 +0000 (18:39 -0700)]
Implement build-dependencies
This adds a flavor of Dependency for build dependencies. Build dependencies are
only ever used when building build commands themselves.
Alex Crichton [Sat, 1 Nov 2014 00:36:48 +0000 (17:36 -0700)]
Add tests for other cargo cmds + -L propagation
Alex Crichton [Fri, 31 Oct 2014 23:20:13 +0000 (16:20 -0700)]
Ensure fresh build commands populate build info
Whenever a build command is fresh, we need to be sure to propagate its build
information upwards from the cache stored on disk.
Alex Crichton [Fri, 31 Oct 2014 22:51:13 +0000 (15:51 -0700)]
Refine the dependency graph for build scripts
Build scripts can immediately start building as soon as all build dependencies
are available and not need to wait for normal dependencies. This commit also
includes a number of refactorings and reorganizations to tidy up how build
scripts are processed.
One primary piece of state introduced in this commit is a shared Arc<Mutex<T>>
which contains information about the processed build scripts as compilation
continues. Compilation commands will draw information from this state and build
scripts will feed information back into this state to ensure it's up to date.
Alex Crichton [Fri, 31 Oct 2014 19:25:40 +0000 (12:25 -0700)]
Implement overrides via local cargo configuration
This is an implementation of overriding native dependencies and passing
aribtrary metadata and such.
Alex Crichton [Fri, 31 Oct 2014 18:17:29 +0000 (11:17 -0700)]
Fix lines_match test for matching process output
Alex Crichton [Fri, 31 Oct 2014 17:49:04 +0000 (10:49 -0700)]
Implement the `links` manifest key
This commit adds the `links` manifest key as a string of a C library which is
being linked to. This is passed as an argument to the build command when not
overridden. The implementation of overrides will come soon!
Pierre Krieger [Wed, 29 Oct 2014 10:23:52 +0000 (11:23 +0100)]
Tweak tests that check whether the build script is being run
Pierre Krieger [Tue, 28 Oct 2014 13:22:02 +0000 (14:22 +0100)]
Move custom-build-related code in its own module
Pierre Krieger [Tue, 28 Oct 2014 09:00:25 +0000 (10:00 +0100)]
Address minor issues
Pierre Krieger [Mon, 27 Oct 2014 16:26:49 +0000 (17:26 +0100)]
Deprecated a few more things
Pierre Krieger [Mon, 27 Oct 2014 16:22:14 +0000 (17:22 +0100)]
Add draft for passing metadata to dependencies
Pierre Krieger [Mon, 27 Oct 2014 16:09:21 +0000 (17:09 +0100)]
Jobs now send back their own description when they start
Pierre Krieger [Mon, 27 Oct 2014 15:29:03 +0000 (16:29 +0100)]
Flags from custom build script are now used
Pierre Krieger [Mon, 27 Oct 2014 14:13:37 +0000 (15:13 +0100)]
Build command output now being checked and written to filesystem
Pierre Krieger [Wed, 22 Oct 2014 21:32:57 +0000 (23:32 +0200)]
Custom build commands are now being run
Pierre Krieger [Wed, 22 Oct 2014 18:32:40 +0000 (20:32 +0200)]
Deprecate old build system and add rust build script as target
Pierre Krieger [Wed, 22 Oct 2014 12:35:23 +0000 (14:35 +0200)]
Extract custom build tests and prefix with "old_"
bors [Wed, 5 Nov 2014 18:08:33 +0000 (18:08 +0000)]
auto merge of #776 : alexcrichton/cargo/issue-488, r=alexcrichton
This helps us not unwrap() and rather propagate the error upwards.
Closes #488
Alex Crichton [Mon, 3 Nov 2014 01:54:06 +0000 (17:54 -0800)]
Update to rust master
Alex Crichton [Thu, 30 Oct 2014 00:56:07 +0000 (17:56 -0700)]
Add a custom join_paths function to wrap the error
This helps us not unwrap() and rather propagate the error upwards.
Closes #488
bors [Sat, 1 Nov 2014 19:29:48 +0000 (19:29 +0000)]
auto merge of #791 : alexcrichton/cargo/update, r=alexcrichton
Alex Crichton [Sat, 1 Nov 2014 19:08:06 +0000 (12:08 -0700)]
Update the curl-rust dependency
Jason Ozias [Sat, 1 Nov 2014 03:50:29 +0000 (23:50 -0400)]
updated to work with DSTify Hash commit in rust
bors [Fri, 31 Oct 2014 22:14:45 +0000 (22:14 +0000)]
auto merge of #775 : alexcrichton/cargo/issue-771, r=brson
The examples output directory was accidentally taken into account twice, and
this removes one source of the output directory confusion.
Closes #771
bors [Fri, 31 Oct 2014 21:29:46 +0000 (21:29 +0000)]
auto merge of #774 : alexcrichton/cargo/issue-740, r=brson
Closes #740
bors [Fri, 31 Oct 2014 20:44:47 +0000 (20:44 +0000)]
auto merge of #773 : alexcrichton/cargo/update-all-packages-from-a-git-repo, r=brson
With the recent resolve rewrite, `cargo update -p foo` would only update one
package in a git repository, even if the repository provided many packages.
Cargo does not currently support depending on the same git repository source
with different precise revisions, and this would cause errors down the line
depending on what happened.
This adds a fix to the `resolve_with_previous` method to ensure that any
non-registry sources being updated will not have any locked packages inside them
which would result in an invalid lockfile.
bors [Fri, 31 Oct 2014 17:11:25 +0000 (17:11 +0000)]
auto merge of #783 : steveklabnik/cargo/require_curl, r=alexcrichton
bors [Fri, 31 Oct 2014 16:55:50 +0000 (16:55 +0000)]
auto merge of #786 : alexcrichton/cargo/update, r=alexcrichton
Alex Crichton [Fri, 31 Oct 2014 16:37:44 +0000 (09:37 -0700)]
Update to rust master
Steve Klabnik [Fri, 31 Oct 2014 03:34:11 +0000 (23:34 -0400)]
Fix requirements in README
bors [Fri, 31 Oct 2014 00:14:50 +0000 (00:14 +0000)]
auto merge of #780 : EduardoBautista/cargo/add-example-output-path-to-docs, r=alexcrichton
Solves #764.
bors [Thu, 30 Oct 2014 23:29:53 +0000 (23:29 +0000)]
auto merge of #735 : tomaka/cargo/platform-specific-deps, r=alexcrichton
cc #610
Eduardo Bautista [Thu, 30 Oct 2014 19:10:57 +0000 (13:10 -0600)]
Say where examples are placed after they are compiled
bors [Thu, 30 Oct 2014 15:50:50 +0000 (15:50 +0000)]
auto merge of #779 : alexcrichton/cargo/update-deps, r=alexcrichton
Alex Crichton [Thu, 30 Oct 2014 15:46:07 +0000 (08:46 -0700)]
Update deps with fail => panic
Also fix a few test's assertion messages
Steve Klabnik [Thu, 30 Oct 2014 01:59:06 +0000 (21:59 -0400)]
fail -> panic
Alex Crichton [Wed, 29 Oct 2014 23:27:16 +0000 (16:27 -0700)]
Check USERNAME for a users's name with `cargo new`
Closes #740
Alex Crichton [Wed, 29 Oct 2014 23:33:52 +0000 (16:33 -0700)]
Fix a repeated `cargo test` with examples
The examples output directory was accidentally taken into account twice, and
this removes one source of the output directory confusion.
bors [Wed, 29 Oct 2014 19:32:55 +0000 (19:32 +0000)]
auto merge of #772 : mattyhall/cargo/master, r=alexcrichton
Fixes #762. I'm not sure if I've used the correct style here. Apologies if it is and/or if the way I've fixed this is wrong!
bors [Wed, 29 Oct 2014 19:04:40 +0000 (19:04 +0000)]
auto merge of #702 : tomassedovic/cargo/run-examples, r=alexcrichton
This lets users run any executable from the `examples` or `bin` directories by
passing its name with `--example` or `--bin` flag.
If neither is specified, we fall back to the old behaviour (running the only bin
target in the project, failing if there are more).
Closes #538
Alex Crichton [Wed, 29 Oct 2014 18:42:45 +0000 (11:42 -0700)]
Be sure to update all packages from a git source
With the recent resolve rewrite, `cargo update -p foo` would only update one
package in a git repository, even if the repository provided many packages.
Cargo does not currently support depending on the same git repository source
with different precise revisions, and this would cause errors down the line
depending on what happened.
This adds a fix to the `resolve_with_previous` method to ensure that any
non-registry sources being updated will not have any locked packages inside them
which would result in an invalid lockfile.
bors [Wed, 29 Oct 2014 18:49:43 +0000 (18:49 +0000)]
auto merge of #768 : alexcrichton/cargo/ssl-fixes, r=brson
The second commit message has the details, and these are the relevant external commits:
* https://github.com/alexcrichton/openssl-static-sys/commit/
2e1c50a7f35ef52ce38dbd405a175b6dccc0ebad
* https://github.com/alexcrichton/curl-rust/commit/
1098e4dd3b89b168b412dfeaba033e41796ea794
Alex Crichton [Wed, 29 Oct 2014 18:47:44 +0000 (11:47 -0700)]
Fix compat with the current rust master
Alex Crichton [Tue, 28 Oct 2014 15:32:54 +0000 (08:32 -0700)]
Update curl-rust to handle SSL config for linuxes
Right now the cargo built on the snapshot bot isn't able to talk to the registry
due to failing to validate the SSL certificate. This is likely due to the
certificate path being hardcoded to something that's compatible with CentOS
(which isn't what I'm running locally).
I've modified curl-rust to use openssl-static-sys to probe the system for where
certificates are located and inform handles by default about the found
locations. This is the same strategy that git2-rs uses to inform openssl about
where the certificates are located.
Matthew Hall [Wed, 29 Oct 2014 12:28:52 +0000 (12:28 +0000)]
Make help command accept -h and --help
Tomas Sedovic [Tue, 28 Oct 2014 08:31:34 +0000 (09:31 +0100)]
Add `--name` to `cargo test` and `cargo bench`
You can now run a single test/bench file by passing its name to `cargo
test` or `cargo bench`.
Alex Crichton [Tue, 28 Oct 2014 15:30:30 +0000 (08:30 -0700)]
Register new snapshots and update the lockfile format
Tomas Sedovic [Mon, 27 Oct 2014 21:49:20 +0000 (22:49 +0100)]
Add `--name` and `--example` to cargo run
This lets us compile and run examples using `cargo run --example NAME`.
Selecting the other binary targets is now done using the `--name` flag.
`cargo run` falls back to the old behaviour (running the only bin target
in the project, failing if there are more) in neither `--name` nor
`--example` are present.
Closes #538
bors [Tue, 28 Oct 2014 19:59:49 +0000 (19:59 +0000)]
auto merge of #769 : tomaka/cargo/delete-design, r=alexcrichton
Pierre Krieger [Tue, 28 Oct 2014 18:33:21 +0000 (19:33 +0100)]
Remove .vimrc, MANIFEST.md, and the DESIGN directory